package ro.msg.quiz.domain;

import java.util.ArrayList;
import java.util.List;

//AUTHOR: Marco,Razvan,Elod

//Object that has id, question text, list of possible answers,
//list of indexes, that represent the correct answers, for the previous list
public class MultipleChoiceQuestion extends Question {
    private List<String> options;
    private List<Integer> correctIndexes;

    public MultipleChoiceQuestion(int id, String text, List<String> options, List<Integer> correctIndexes) {
	super(id, text);
	this.options = new ArrayList<String>();
	this.options = options;
	this.correctIndexes = new ArrayList<Integer>();
	this.correctIndexes = correctIndexes;
    }

    /**
     * @return the type
     */
    @Override
    public QuestionType getType() {
	return QuestionType.MULTIPLE_CHOICE_Q;
    }

    /**
     * @return the options
     */
    public List<String> getOptions() {
	return options;
    }

    /**
     * @param options
     *            the options to set
     */
    public void setOptions(List<String> options) {
	this.options = options;
    }

    /**
     * @return the correctIndexes
     */
    public List<Integer> getCorrectIndexes() {
	return correctIndexes;
    }

    /**
     * @param correctIndexes
     *            the correctIndexes to set
     */
    public void setCorrectIndexes(List<Integer> correctIndexes) {
	this.correctIndexes = correctIndexes;
    }

    @Override
    public String toString() {
	return this.getId() + " " + this.getType().get() + " '" + this.getText() + "' '" + this.options + "' " + this.correctIndexes;
    }

}